\hypertarget{light__sensor_8c}{
\section{Sensors/light\_\-sensor.c File Reference}
\label{light__sensor_8c}\index{Sensors/light\_\-sensor.c@{Sensors/light\_\-sensor.c}}
}
{\ttfamily \#include \char`\"{}inc/lm3s8962.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}inc/hw\_\-memmap.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}inc/hw\_\-types.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}inc/hw\_\-qei.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}driverlib/gpio.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}driverlib/adc.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}driverlib/rom.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}driverlib/rom\_\-map.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}driverlib/sysctl.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}roneos.h\char`\"{}}\par
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{light__sensor_8c_aeec179d7880421687dba7262d404e7d8}{light\_\-sensor\_\-init} (void)
\begin{DoxyCompactList}\small\item\em Initializes light sensor. \end{DoxyCompactList}\item 
int32 \hyperlink{light__sensor_8c_a3a1277922019b7c3605abbbf55710b4e}{light\_\-sensor\_\-get\_\-value} (uint32 light\_\-sensor)
\end{DoxyCompactItemize}


\subsection{Detailed Description}


\subsection{Function Documentation}
\hypertarget{light__sensor_8c_a3a1277922019b7c3605abbbf55710b4e}{
\index{light\_\-sensor.c@{light\_\-sensor.c}!light\_\-sensor\_\-get\_\-value@{light\_\-sensor\_\-get\_\-value}}
\index{light\_\-sensor\_\-get\_\-value@{light\_\-sensor\_\-get\_\-value}!light_sensor.c@{light\_\-sensor.c}}
\subsubsection[{light\_\-sensor\_\-get\_\-value}]{\setlength{\rightskip}{0pt plus 5cm}int32 light\_\-sensor\_\-get\_\-value (
\begin{DoxyParamCaption}
\item[{uint32}]{light\_\-sensor}
\end{DoxyParamCaption}
)}}
\label{light__sensor_8c_a3a1277922019b7c3605abbbf55710b4e}


Gets the ADC value of the specified light sensor.

If the input light sensor is not recognized, returns 0 
\begin{DoxyParams}{Parameters}
{\em light\_\-sensor} & specifies which light sensor you want to check (only 0, 1, 2 are allowed) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the ADC value; 0 if the input parameter is not recognized
\end{DoxyReturn}


\hypertarget{light__sensor_8c_aeec179d7880421687dba7262d404e7d8}{
\index{light\_\-sensor.c@{light\_\-sensor.c}!light\_\-sensor\_\-init@{light\_\-sensor\_\-init}}
\index{light\_\-sensor\_\-init@{light\_\-sensor\_\-init}!light_sensor.c@{light\_\-sensor.c}}
\subsubsection[{light\_\-sensor\_\-init}]{\setlength{\rightskip}{0pt plus 5cm}void light\_\-sensor\_\-init (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}
\label{light__sensor_8c_aeec179d7880421687dba7262d404e7d8}


Initializes light sensor. 

Sets sampling speed and configures and enables the light sensor. \begin{DoxyReturn}{Returns}
void 
\end{DoxyReturn}
